package com.yans.maps
{
	public class ColorConfig
	{
		public static var OPERATION_RECT_COLOR:uint = 0x222222;
		public static var OPERATION_LINE_COLOR:uint = 0xFF0000;
		public static var WALKABLE_RECT_COLOR:uint = 0xFFFF00;
		public static var BLOCK_RECT_COLOR:uint = 0;
		public static var HALF_TRANSPARENT_COLOR:uint = 0xFF00;
		public static var SAFE_PLACE_COLOR:uint = 0x770000;
		public static var STALL_PLACE_COLOR:uint = 119;
		public static var TYPE_LINE_COLOR:uint = 0xFF0000;
		
		public static function getColorByType(_arg1:int):uint{
			var _local2:uint;
			if (_arg1 == MapConfig.BLOCK)
			{
				return (BLOCK_RECT_COLOR);
			};
			if ((_arg1 & MapConfig.WALKABLE) != 0)
			{
				if ((_arg1 & MapConfig.STALL_PLACE) != 0)
				{
					_local2 = (_local2 | STALL_PLACE_COLOR);
				};
				if ((_arg1 & MapConfig.SAFE_PLACE) != 0)
				{
					_local2 = (_local2 | SAFE_PLACE_COLOR);
				};
				if ((_arg1 & MapConfig.HALF_TRANSPARENT) != 0)
				{
					_local2 = (_local2 | HALF_TRANSPARENT_COLOR);
				};
				if (_local2 != 0)
				{
					return (_local2);
				};
				return (WALKABLE_RECT_COLOR);
			};
			return (BLOCK_RECT_COLOR);
		}
		
		public static function getStringByType(type:int):String { 
			var strArr:Array = [];
			if (type == MapConfig.BLOCK || type == -1)
			{
				strArr.unshift("不可行");
			}
			else if ((type & MapConfig.WALKABLE) != MapConfig.BLOCK)
			{
				if ((type & MapConfig.STALL_PLACE) != 0)
				{
					strArr.unshift("摆摊");
				};
				if ((type & MapConfig.SAFE_PLACE) != 0)
				{
					strArr.unshift("安全");
				};
				if ((type & MapConfig.HALF_TRANSPARENT) != 0)
				{
					strArr.unshift("半透明");
				}
				strArr.unshift("可行");
			};
			return strArr.toString() + "区域";
		}

		public function ColorConfig()
		{
		}
	}
}